Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OCPCLOUD-1423] Machine webhook validation for Azure Ultra Disks #1001

Merged
merged 3 commits into from
Mar 23, 2022

Conversation

damdo
Copy link
Member

@damdo damdo commented Mar 17, 2022

@damdo
Copy link
Member Author

damdo commented Mar 17, 2022

Note: I did some manual testing of the webhook validation:

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].lun: Invalid value: 0: each Data Disk must have a unique lun): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].lun: Invalid value: 0: each Data Disk must have a unique lun

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].nameSuffix: Invalid value: "testdiskk": each Data Disk must have a unique nameSuffix): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].nameSuffix: Invalid value: "testdiskk": each Data Disk must have a unique nameSuffix

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].nameSuffix: Invalid value: "testdiskkdaoudasuigdsaiugdsaiusdgisaugdiuasgdsaiudgasiudgasiudgasiudgsaiudgasdisaiduashdiuasgdsaiugdasuidgiuasgdi": too long, the overall disk name must not exceed 80 chars): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].nameSuffix: Invalid value: "testdiskkdaoudasuigdsaiugdsaiusdgisaugdiuasgdsaiudgasiudgasiudgasiudgsaiudgasdisaiduashdiuasgdsaiugdasuidgiuasgdi": too long, the overall disk name must not exceed 80 chars

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].nameSuffix: Invalid value: "sss$aaa": nameSuffix must be provided and can only contain letters, numbers, underscores, periods or hyphens): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].nameSuffix: Invalid value: "sss$aaa": nameSuffix must be provided and can only contain letters, numbers, underscores, periods or hyphens

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].diskSizeGB: Invalid value: 1: diskSizeGB must be provided and at least 4GB in size): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].diskSizeGB: Invalid value: 1: diskSizeGB must be provided and at least 4GB in size

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].cachingType: Invalid value: "ReadOnly": must be "None" or omitted when storageAccountType is "UltraSSD_LRS"): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].cachingType: Invalid value: "ReadOnly": must be "None" or omitted when storageAccountType is "UltraSSD_LRS"

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].lun: Invalid value: 64: must be higher or equal than 0 and lower than 64): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].lun: Invalid value: 64: must be higher or equal than 0 and lower than 64

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[1].lun: Invalid value: -1: must be higher or equal than 0 and lower than 64): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[1].lun: Invalid value: -1: must be higher or equal than 0 and lower than 64

oc -n openshift-machine-api apply -f ms-n1.yaml
Error from server (providerSpec.dataDisks[0].nameSuffix: Invalid value: "": nameSuffix must be provided and can only contain letters, numbers, underscores, periods or hyphens): error when creating "ms-n1.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.dataDisks[0].nameSuffix: Invalid value: "": nameSuffix must be provided and can only contain letters, numbers, underscores, periods or hyphens

Copy link
Contributor

@alexander-demicev alexander-demicev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexander-demichev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2022
pkg/webhooks/machine_webhook.go Show resolved Hide resolved
pkg/webhooks/machine_webhook.go Show resolved Hide resolved
pkg/webhooks/machine_webhook.go Outdated Show resolved Hide resolved
@damdo damdo force-pushed the azure-ultra-disks branch from e1f3b95 to c708380 Compare March 18, 2022 15:12
@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2022
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@damdo
Copy link
Member Author

damdo commented Mar 20, 2022

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@damdo
Copy link
Member Author

damdo commented Mar 20, 2022

Until we settle on the naming of the const.
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 20, 2022
@damdo damdo force-pushed the azure-ultra-disks branch from c708380 to dba74ec Compare March 22, 2022 00:10
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 22, 2022
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

1 similar comment
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 22, 2022
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 22, 2022
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

1 similar comment
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

Hold until we confirm the desired behaviour on instance deletion.
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 22, 2022
@damdo
Copy link
Member Author

damdo commented Mar 22, 2022

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 22, 2022

@damdo: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-operator dba74ec link false /test e2e-azure-operator
ci/prow/e2e-metal-ipi-virtualmedia dba74ec link false /test e2e-metal-ipi-virtualmedia
ci/prow/e2e-aws-disruptive dba74ec link false /test e2e-aws-disruptive
ci/prow/e2e-metal-ipi-upgrade dba74ec link false /test e2e-metal-ipi-upgrade
ci/prow/e2e-azure dba74ec link false /test e2e-azure
ci/prow/e2e-metal-ipi-ovn-ipv6 dba74ec link false /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-vsphere-operator dba74ec link false /test e2e-vsphere-operator
ci/prow/e2e-vsphere-upgrade dba74ec link false /test e2e-vsphere-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@damdo
Copy link
Member Author

damdo commented Mar 23, 2022

/retest-required

@damdo
Copy link
Member Author

damdo commented Mar 23, 2022

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 23, 2022
@openshift-merge-robot openshift-merge-robot merged commit ca4a55b into openshift:master Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants